<template>
  <div class="ma-content-block lg:flex justify-between p-4">
    <!-- CRUD 组件 -->
    <ma-crud :options="options" :columns="columns" ref="crudRef">
    </ma-crud>
  </div>
</template>
<script setup>
import { ref, reactive } from 'vue'
import supplierService from '@/api/logistics/supplierService'
import { Message } from '@arco-design/web-vue'
import tool from '@/utils/tool'
import * as common from '@/utils/common'
import useSupplierService from "@/utils/crud/useSupplierService.js";

const crudRef = ref()
const options = reactive({
  id: 'supplier_service',
  pageLayout: 'fixed',
  rowSelection: {
    showCheckedAll: true
  },
  pk: 'id',
  operationColumn: true,
  operationColumnWidth: 160,
  formOption: {
    viewType: 'modal',
    width: 600
  },
  api: supplierService.getList,
  recycleApi: supplierService.getRecycleList,
  add: {
    show: true,
    api: supplierService.save,
    auth: ['logistics:supplierService:save']
  },
  edit: {
    show: true,
    api: supplierService.update,
    auth: ['logistics:supplierService:update']
  },
  delete: {
    show: true,
    api: supplierService.deletes,
    auth: ['logistics:supplierService:delete'],
    realApi: supplierService.realDeletes,
    realAuth: ['logistics:supplierService:realDeletes']
  },
  recovery: {
    show: true,
    api: supplierService.recoverys,
    auth: ['logistics:supplierService:recovery']
  }
})
const columns = ref(useSupplierService.columns);

</script>
<script> export default { name: 'logistics:supplierService' } </script>